import { execSync } from 'child_process';

export default function executeSync(cmd) {
    try {
        console.log('');
        console.log('EXE =>', cmd);
        console.log('');
        const output = execSync(cmd, {
            stdio: 'inherit'
        });
        if (output !== null) {
            console.log(output);
        }
        console.log('');
        return true;
    } catch (error) {
        if (typeof error.messsage !== 'undefined') {
            console.error(error.messsage);
        }
        console.log('');
        return false;
    }
};
